<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //自定义一个对象，给这个对象自定义say()方法，和play()方法
        let youxi = {
            name:'狼人杀',
            [Symbol('say')]:function(){
                console.log('我可以说');
            },
            [Symbol('play')]:function(){
                console.log('我可以打');
            }
        }
        console.log(youxi);  //这样可以看到对象中自定义的两个方法
        
    </script>
</body>
</html>